package cn.itheima.service.impl;
/*
* 业务层实现类
* */
import cn.itheima.dao.StudentDao;
import cn.itheima.dao.impl.StudentDaoImpl;
import cn.itheima.domain.Student;
import cn.itheima.service.StudentService;

import java.util.ArrayList;

public class StudentServiceImpl implements StudentService {
    private StudentDao dao = new StudentDaoImpl();
    @Override
    public ArrayList<Student> findAll() {
        ArrayList<Student> list = dao.findAll();
        return list;
    }

    @Override
    public Student findById(Integer id) {
        Student stu = dao.findById(id);
        return stu;
    }
}
